<form #form1="ngForm" [formGroup]="formGroup" (ngSubmit)="onSearch()" novalidate>
    <div class="row">
        <div class="col-md-3">
            <mat-form-field>
                <input matInput name="startDate" [matDatepicker]="startTime" placeholder="生日开始时间" formControlName="startTime" (click)="startTime.open()"
                    (keydown)="startTime.open()" [max]="maxStartDate">
                <mat-datepicker-toggle matSuffix [for]="startTime"></mat-datepicker-toggle>
                <mat-datepicker #startTime touchUi="true" (selectedChanged)="minEndDateChange($event)"></mat-datepicker>
            </mat-form-field>
        </div>
        <div class="col-md-3">
            <mat-form-field>
                <input matInput name="endDate" [matDatepicker]="endTime" placeholder="生日结束时间" formControlName="endTime" (click)="endTime.open()"
                    (keydown)="endTime.open()" [min]="minEndDate">
                <mat-datepicker-toggle matSuffix [for]="endTime"></mat-datepicker-toggle>
                <mat-datepicker #endTime touchUi="true" (selectedChanged)="maxStartDateChange($event)"></mat-datepicker>
            </mat-form-field>
        </div>
        <div class="col-md-3">
            <mat-form-field>
                <input matInput name="userName" placeholder="姓名" formControlName="name">
            </mat-form-field>
        </div>
        <div class="col-md-3">
            <mat-form-field>
                <input matInput placeholder="人生状态" [matAutocomplete]="auto" formControlName="status" (keyup.enter)="getStatus()" (blur)="getStatus()">
                <mat-autocomplete #auto="matAutocomplete">
                    <mat-option *ngFor="let state of filteredStatus" [value]="state">
                        <span>{{ state }}</span>
                    </mat-option>
                </mat-autocomplete>
            </mat-form-field>
        </div>
    </div>
    <div class="row">
        <!-- <div class="col-lg-3 col-md-4 col-sm-6 col-xs-12">
            <button class="btn btn-success" (click)="add()">
                <i class="fa fa-plus"></i> 添加</button>
        </div> -->
        <div class="col-lg-3 col-md-4 col-sm-6 col-xs-12">
        </div>
        <div class="col-lg-3 col-md-4 col-sm-6 col-xs-12">
        </div>
        <div class="col-lg-3 col-md-4 col-sm-6 col-xs-12">
            <a class="mytooltip">
                <button type="submit" class="btn btn-success" [disabled]="!form1.form.valid">
                    <i class="fa fa-search"></i> 搜索</button>
                <span *ngIf="!form1.form.valid" class="tooltip-content2">时间有误</span>
            </a>
            <button type="button" class="btn btn-inverse" (click)="refresh()">
                <i class="fa fa-refresh"></i> 重置</button>
        </div>
    </div>
</form>